# 基础镜像
FROM alpine

# 镜像维护者
MAINTAINER alpine-python-apk Docker image "enovo458@126.com" author "drophair"

# alpine更换 阿里 镜像源
RUN echo "http://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories && \
    echo "http://mirrors.aliyun.com/alpine/latest-stable/community/" >> /etc/apk/repositories
# 安装 ca-certificates curl bash tree tzdata wget
RUN apk update && \
    apk add --no-cache ca-certificates && \
    apk add --no-cache curl bash tzdata && \
    apk add --no-cache wget && \
    apk add --no-cache python3 && \
    apk add --no-cache vim && \
    cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    cd /root && \
    wget https://gitee.com/drophair/docker-sh/raw/master/dependency/.vimrc /root/.vimrc && \
    source /root/.vimrc && \
    ln -s /usr/bin/python3 /usr/bin/python && \
    wget -O get-pip.py https://files.cnblogs.com/files/jackwang-sparrow/get-pip.py.zip && \
    cd /root && \
    python get-pip.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com && \
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U && \
    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
    pip install setuptools